#include "BufferBindingList.h"


BufferBindingList::BufferBindingList(void) : Resource()
{

}


BufferBindingList::~BufferBindingList(void)
{
	Dispose();
}

void BufferBindingList::Dispose()
{
	Unbind();
	glDeleteVertexArrays(1,&vao);
}
void BufferBindingList::Bind()
{
	if(IsAllocated() == false)
	{
		glGenVertexArrays(1,&vao);
		SetAllocated();
	}

	glBindVertexArray(vao);

}
void BufferBindingList::Unbind()
{
	glBindVertexArray(0);
}